home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1996 February: Tool Chest / Apple Developer CD Series Tool Chest February 1996 (Apple Computer)(1996).iso / Sample Code / MoreFiles 1.3.1 / Sharing.h < prev    next >
Encoding:
C/C++ Source or Header  |  1995-04-16  |  3.3 KB  |  95 lines  |  [TEXT/MMCC]

  1. /*
  2. **    Apple Macintosh Developer Technical Support
  3. **
  4. **    PBShare, PBUnshare, and PBGetUGEnty (should be in Files.h but isn't.)
  5. **
  6. **    by Jim Luther, Apple Developer Technical Support
  7. **
  8. **    File:        Sharing.h
  9. **
  10. **    Copyright © 1992-1994 Apple Computer, Inc.
  11. **    All rights reserved.
  12. **
  13. **    You may incorporate this sample code into your applications without
  14. **    restriction, though the sample code has been provided "AS IS" and the
  15. **    responsibility for its operation is 100% yours.  However, what you are
  16. **    not permitted to do is to redistribute the source as "DSC Sample Code"
  17. **    after having made changes. If you're going to re-distribute the source,
  18. **    we require that you make it clear in the source that the code was
  19. **    descended from Apple Sample Code, but that you've made changes.
  20. */
  21.  
  22. #ifndef __SHARING__
  23. #define __SHARING__
  24.  
  25.  
  26. pascal OSErr PBShare(HParmBlkPtr paramBlock,
  27.                      Boolean async) = {
  28.                                 0x101F,        /* MOVE.B     (A7)+,D0   */
  29.                                 0x205F,        /* MOVEA.L    (A7)+,A0   */
  30.                                 0x6606,        /* BNE.S      *+$0008    */
  31.                                 0x7042,        /* MOVEQ      #$42,D0    */
  32.                                 0xA260,        /* _FSDispatch,Immed     */
  33.                                 0x6004,        /* BRA.S      *+$0006    */
  34.                                 0x7042,        /* MOVEQ      #$42,D0    */
  35.                                 0xA660,        /* _FSDispatch,Sys,Immed */
  36.                                 0x3E80};    /* MOVE.W     D0,(A7)    */
  37.  
  38. #pragma parameter __D0 PBShareSync(__A0)
  39. pascal OSErr PBShareSync(HParmBlkPtr paramBlock) = {
  40.                                 0x7042,        /* MOVEQ      #$42,D0    */
  41.                                 0xA260};    /* _FSDispatch,Immed     */
  42.  
  43. #pragma parameter __D0 PBShareAsync(__A0)
  44. pascal OSErr PBShareAsync(HParmBlkPtr paramBlock) = {
  45.                                 0x7042,        /* MOVEQ      #$42,D0    */
  46.                                 0xA660};    /* _FSDispatch,Sys,Immed */
  47.  
  48.  
  49. pascal OSErr PBUnshare(HParmBlkPtr paramBlock,
  50.                        Boolean async) = {
  51.                                 0x101F,        /* MOVE.B     (A7)+,D0   */
  52.                                 0x205F,        /* MOVEA.L    (A7)+,A0   */
  53.                                 0x6606,        /* BNE.S      *+$0008    */
  54.                                 0x7043,        /* MOVEQ      #$43,D0    */
  55.                                 0xA260,        /* _FSDispatch,Immed     */
  56.                                 0x6004,        /* BRA.S      *+$0006    */
  57.                                 0x7043,        /* MOVEQ      #$43,D0    */
  58.                                 0xA660,        /* _FSDispatch,Sys,Immed */
  59.                                 0x3E80};    /* MOVE.W     D0,(A7)    */
  60.  
  61. #pragma parameter __D0 PBUnshareSync(__A0)
  62. pascal OSErr PBUnshareSync(HParmBlkPtr paramBlock) = {
  63.                                 0x7043,        /* MOVEQ      #$43,D0    */
  64.                                 0xA260};    /* _FSDispatch,Immed     */
  65.  
  66. #pragma parameter __D0 PBUnshareAsync(__A0)
  67. pascal OSErr PBUnshareAsync(HParmBlkPtr paramBlock) = {
  68.                                 0x7043,        /* MOVEQ      #$43,D0    */
  69.                                 0xA660};    /* _FSDispatch,Sys,Immed */
  70.  
  71.  
  72. pascal OSErr PBGetUGEntry(HParmBlkPtr paramBlock,
  73.                           Boolean async) = {
  74.                                 0x101F,        /* MOVE.B     (A7)+,D0   */
  75.                                 0x205F,        /* MOVEA.L    (A7)+,A0   */
  76.                                 0x6606,        /* BNE.S      *+$0008    */
  77.                                 0x7044,        /* MOVEQ      #$44,D0    */
  78.                                 0xA260,        /* _FSDispatch,Immed     */
  79.                                 0x6004,        /* BRA.S      *+$0006    */
  80.                                 0x7044,        /* MOVEQ      #$44,D0    */
  81.                                 0xA660,        /* _FSDispatch,Sys,Immed */
  82.                                 0x3E80};    /* MOVE.W     D0,(A7)    */
  83.  
  84. #pragma parameter __D0 PBGetUGEntrySync(__A0)
  85. pascal OSErr PBGetUGEntrySync(HParmBlkPtr paramBlock) = {
  86.                                 0x7044,        /* MOVEQ      #$44,D0    */
  87.                                 0xA260};    /* _FSDispatch,Immed     */
  88.  
  89. #pragma parameter __D0 PBGetUGEntryAsync(__A0)
  90. pascal OSErr PBGetUGEntryAsync(HParmBlkPtr paramBlock) = {
  91.                                 0x7044,        /* MOVEQ      #$44,D0    */
  92.                                 0xA660};    /* _FSDispatch,Sys,Immed */
  93.  
  94. #endif
  95.